package com.wzgl.core.controller;

import java.math.BigInteger;

import com.jfinal.plugin.activerecord.Page;
import com.wzgl.core.base.JBaseController;
import com.wzgl.core.model.Trelease;
import com.wzgl.core.model.TwebSite;

public class WebSiteController extends JBaseController{
	
	public void WebSiteIndex(){
		render("website_list.jsp");
	}
	
	/**
	 * 获取网站站点信息
	 */
	public void webSiteList(){
		Page<TwebSite> list_page;
		try {
			BigInteger page=getParaToBigInteger("page",BigInteger.valueOf(1));
			BigInteger pagesize=getParaToBigInteger("pagesize",BigInteger.valueOf(5));
			String fvalue =  getParaTo("fvalue");
			TwebSite t = getModel(TwebSite.class);
			t.setFdesc(fvalue);
			list_page= TwebSite.dao.paginate(page.intValue(),pagesize.intValue(),t);
			renderAjaxResult("",0,list_page);
		} catch (Exception e) {
			e.printStackTrace();
			renderAjaxResultForError(e.getMessage());
		}
	}
}
